package com.surveillance.tests;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashSet;
import java.util.Locale;
import java.util.Set;
import java.util.ArrayList;
import java.util.List;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.surveillance.BO.BOLayer;
import com.surveillance.BO.SalleBO;
import com.surveillance.entities.Etudiant;
import com.surveillance.entities.Salle;
import com.surveillance.util.HandlingDates;

public class TestSalles {
	public static void main(String[] args) {
		ApplicationContext appContext = new ClassPathXmlApplicationContext(
				"beanLocations.xml");
		@SuppressWarnings("unchecked")
		BOLayer<Salle> salleBO = (BOLayer<Salle>) appContext.getBean("SalleBO");
		BOLayer<Etudiant> etudiantBO = (BOLayer<Etudiant>) appContext
				.getBean("EtudiantBO");
		ArrayList<Salle> fetchedAffectedSalles = (ArrayList<Salle>) ((SalleBO) salleBO)
				.getSallesAfterAffectation(1, true);
		System.out.println("affichage des salles apres affectation");
		for (int i = 0; i < fetchedAffectedSalles.size(); i++) {
			System.out.println(fetchedAffectedSalles.get(i));
		}

	}
}
